import request from "./../request.js";


//创建族谱
export function createFamily(data)
{
  return request.post("Familyhistory/createFamily", data, { noAuth: true});
}

//获取省市区三级联动
export function getAddressList(data)
{
  return request.post("Familyhistory/getAddressList", data, { noAuth: true});
}


//族谱列表
export function getFamilyList(data)
{
  return request.post("Familyhistory/getFamilyList", data, { noAuth: true});
}
//------------------------------------------------------------------


//姓氏列表
export function surnameList(data)
{
  return request.post("Family/surnameList", data, { noAuth: true});
}


// 查询已入族谱人员
// ?grandpa_name=爷爷姓名&parent_name=父亲姓名&name=自己姓名

// 个人中心认领族谱 ?people_id=
export function claimFamilyPeople(data)
{
  return request.post("Family/claimFamilyPeople", data, { noAuth: true});
}


// 查看我的族谱和族长创建族谱
// source=(1我的族谱，2创建族谱)
export function familyList(data)
{
  return request.post("Family/familyList", data, { noAuth: true});
}



// 族长创建族谱
// ?surname_id=姓氏id&province_id=省&city_id=&area_id=&town_id=街道&village_id=村管委会&address=详细
export function addFamily(data)
{
  return request.post("Family/addFamily", data, { noAuth: true});
}


// 族长查询某个族谱
export function familyInfo(data)
{
  return request.post("Family/familyInfo", data, { noAuth: true});
}
// ?id=族谱id&province_id=省&city_id=&area_id=&town_id=街道&village_id=村管委会&address=详细
export function updateFamily(data)
{
  return request.post("Family/updateFamily", data, { noAuth: true});
}


// 查询省市区街道村5级联动
// ?province_id=或city_id=或area_id=或town_id=
export function AddrList(data)
{
  return request.post("Address/AddrList", data, { noAuth: true});
}


//通过id 查询地址详细信息
export function getAddrInfo(data)
{
  return request.post("Address/getAddrInfo", data, { noAuth: true});
}

//查询族谱树状图
export function familyTreeList(data)
{
  return request.post("Family_tree/familyTreeList", data, { noAuth: true});
}
//查询静态树状图
export function familyTreeView(data)
{
  return request.post("Family_tree/familyTreeView", data, { noAuth: true});
}
//查询字辈
export function genealogyList(data)
{
  return request.post("Family_Tree/genealogyList", data, { noAuth: true});
}
//搜索族员
export function searchTree(data)
{
  return request.post("Family_Tree/searchTree", data, { noAuth: true});
}
//模糊查询族员个人信息
export function dimFamilyPeople(data)
{
  return request.post("Family_tree/dimFamilyPeople", data, { noAuth: true});
}
//创建初始成员
export function addCreateFamily(data)
{
  return request.post("Family_tree/addCreateFamily", data, { noAuth: true});
}
//添加子辈
export function addChildFamily(data)
{
  return request.post("Family_tree/addChildFamily", data, { noAuth: true});
}
//添加配偶
export function addMateFamily(data)
{
  return request.post("Family_tree/addMateFamily", data, { noAuth: true});
}
//添加父辈
export function addParentFamily(data)
{
  return request.post("Family_tree/addParentFamily", data, { noAuth: true});
}
//查看生平
export function familyPeopleInfo(data)
{
  return request.post("Family_tree/familyPeopleInfo", data, { noAuth: true});
}
//修改族谱成员信息
export function updateFamilyPeople(data)
{
  return request.post("Family_tree/updateFamilyPeople", data, { noAuth: true});
}
//加入族谱收费支付
export function joinFamilyOrder(data)
{
  return request.post("Family_tree/joinFamilyOrder", data, { noAuth: true});
}
//查询灵堂
export function worshipHallInfo(data)
{
  return request.post("Worship/worshipHallInfo", data, { noAuth: true});
}
//千古流芳创建灵堂
export function eternalHallInfo(data)
{
  return request.post("Worship/eternalHallInfo", data, { noAuth: true});
}
//创建灵堂
export function createWorshipHall(data)
{
  return request.post("Worship/createWorshipHall", data, { noAuth: true});
}
//贡品列表
export function displayWorshipGoods(data)
{
  return request.post("Worship/displayWorshipGoods", data, { noAuth: true});
}

//积分消费贡品列表
export function createWorshipGood(data)
{
  return request.post("Worship/createWorshipGood", data, { noAuth: true});
}


//编辑灵堂
export function editWorshipHall(data)
{
  return request.post("Worship/editWorshipHall", data, { noAuth: true});
}
//祭拜创建订单接口
export function createOrder(data)
{
  return request.post("Worship/createOrder", data, { noAuth: true});
}
//祭拜记录
export function worshipLog(data)
{
  return request.post("Worship/worshipLog", data, { noAuth: true});
}
// //公开的族谱列表
export function openFamilyList(data)
{
  return request.post("Family/getFamilyList", data, { noAuth: true});
}
//公开的族谱详情
export function getFamilyDetail(data)
{
  return request.post("Family/getFamilyDetail", data, { noAuth: true});
}

//获取谱文类目
export function getColumnList(data)
{
  return request.post("Genealogy/getColumnList", data, { noAuth: true});
}
//新增谱文类目
export function addColumn(data)
{
  return request.post("Genealogy/addColumn", data, { noAuth: true});
}
//删除谱文类目
export function delColumn(data)
{
  return request.post("Genealogy/delColumn", data, { noAuth: true});
}
//提交谱文
export function submitArticle(data)
{
  return request.post("Genealogy/submitArticle", data, { noAuth: true});
}
//获取谱文列表
export function getArticleList(data)
{
  return request.post("Genealogy/getArticleList", data, { noAuth: true});
}
//获取谱文详情
export function puwen_detail(data)
{
  return request.post("Genealogy/detail", data, { noAuth: true});
}
//编辑谱文
export function editArticle(data)
{
  return request.get("Genealogy/editArticle", data, { noAuth: true});
}

export function edit_article(data)
{
  let article_id = data.article_id;
  delete data.article_id;
  return request.post("Genealogy/editArticle?article_id="+article_id, data, { noAuth: true});
}


//删除谱文
export function delArticle(data)
{
  return request.post("Genealogy/delArticle", data, { noAuth: true});
}
//自动生成谱书
export function autoCreateBook(data)
{
  return request.post("Genealogy/autoCreateBook", data, { noAuth: true});
}
//谱书列表
export function getBookList(data)
{
  return request.post("Genealogy/getBookList", data, { noAuth: true});
}
//查阅谱书
export function previewBook(data)
{
  return request.post("Genealogy/previewBook", data, { noAuth: true});
}


//审核列表
// ？family_id=
export function auditPeopleList(data)
{
  return request.post("Family_tree/auditPeopleList", data, { noAuth: true});
}

//审核
// ?family_id=&people_id=&audit=(0待审核，1审核通过，2审核不通过)
export function auditPeople(data)
{
  return request.post("Family_tree/auditPeople", data, { noAuth: true});
}


// 查看激活码
// 查看我创建的子女
export function myCreateFamilyPeople(data)
{
  return request.post("Family_tree/myCreateFamilyPeople", data, { noAuth: true});
}


// 发布族谱照片墙
// title 标题
// family_id：族谱id
// pics：图片集合(多个逗号隔开)
// content：文字内容

export function uploadPhotoWall(data)
{
  return request.post("family/uploadPhotoWall", data, { noAuth: true});
}



// 获取照片墙
// family_id：族谱id
// page：页码
export function getPhotoList(data)
{
  return request.post("family/getPhotoList", data, { noAuth: true});
}

//获取照片墙详情
// photo_wall_id：照片id
export function getPhotoDetail(data)
{
  return request.post("family/getPhotoDetail", data, { noAuth: true});
}

//用户首页后台菜单数据
export function getPagesIndex(data)
{
  return request.post("Pages/pagesIndex", data, { noAuth: true});
}

//姓氏库
export function getxingshi(page,data)
{
  return request.post("Pages/getcardlist?&page="+page, data, { noAuth: true});
}

//获取姓氏库详细资料
export function getCardInfo(data)
{
  return request.post("Pages/getCardInfo", data, { noAuth: true});
}

//捐赠功能开发
//获取捐赠列表
export function getDonationList(data)
{
  return request.post("donation/Donation/list", data, { noAuth: true});
}

//获取捐赠详情
export function getDonationByInfo(data)
{
  return request.post("donation/Donation/listById", data, { noAuth: true});
}

//创建捐赠
export function carateDonation(data)
{
  return request.post("donation/Donation/add", data, { noAuth: true});
}

//修改捐赠
export function updateDonation(data)
{
  return request.post("donation/Donation/edit", data, { noAuth: true});
}

//捐赠支付创建订单
export function payDonationLogs(data)
{
  return request.post("donation/Donation/createOrder", data, { noAuth: true});
}
